package com.jt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jt.pojo.User;
import com.jt.vo.PageResult;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;

import java.util.List;

/**
 * @author 刘昱江
 * 时间 2021/2/2
 */
public interface UserMapper extends BaseMapper<User> {
    List<User> findUserListByPage(Integer start, Integer pageSize, String username);
    @Delete("delete from user_role where id = #{id}")
    void deleteUserRole(Integer id);
    @Insert("insert into user_role(id,role_id) values(#{userId},#{roleId})")
    void saveUserRole(Integer userId, Integer roleId);
}
